﻿using System;
using System.Web.Routing;

namespace VS.Web
{
    public class Global : System.Web.HttpApplication
    {
     
        protected void Application_Start(object sender, EventArgs e)
        {
            RegisterRoutes(RouteTable.Routes);
        }

        private void RegisterRoutes(RouteCollection routes)
        {
            routes.Ignore("Services/VS-Web-Services-FileService.svc/binary/GetFiles");
            routes.Ignore("Services/VS-Web-Services-AuthenticationService.svc/binary/Login");
            
            routes.MapPageRoute("deepLinkRoute", "{module}/{region}/{view}/{parameters}", "~/Default.aspx", false);

            //RouteDebug.RouteDebugger.RewriteRoutesForTesting(RouteTable.Routes);
        }

        protected void Application_BeginRequest(object sender, EventArgs e)
        {

        }

        protected void Application_AuthenticateRequest(object sender, EventArgs e)
        {

        }

        protected void Application_Error(object sender, EventArgs e)
        {

        }

        protected void Session_End(object sender, EventArgs e)
        {

        }

        protected void Application_End(object sender, EventArgs e)
        {

        }
    }
}